package com.java.diagnostics.visualizer.gc.i5V5r4.parser;

import com.java.diagnostics.visualizer.data.SourceData;
import com.java.diagnostics.visualizer.exceptions.GCAndMemoryVisualizerException;
import com.java.diagnostics.visualizer.impl.factory.LogFactory;
import com.java.diagnostics.visualizer.parser.vgc.VGCParser;
import com.java.diagnostics.visualizer.properties.OutputProperties;
import com.java.diagnostics.visualizer.sources.Source;
import java.util.logging.Logger;

public class I5V5r4Parser
  implements VGCParser
{
  private static final Logger TRACE = LogFactory.getTrace(I5V5r4Parser.class);
  
  private final String className = getClass().getName();
  
  private static final String PARSEABLE_TARGET = "General_Information";
  private static final String PARSEABLE_TARGET_2 = "GENERAL_INFORMATION";
  
  public boolean isParseableSource(Source source)
    throws GCAndMemoryVisualizerException
  {
    if (!source.containsWithinReasonableDistanceOfStart("General_Information"))
    {
      if (!source.containsWithinReasonableDistanceOfStart("GENERAL_INFORMATION")) return false;
    }
    return 
    
      true;
  }
  
  public SourceData parse(Source source, OutputProperties properties) throws GCAndMemoryVisualizerException
  {
    TRACE.entering(this.className, "parse");
    SourceData data = new InstanceI5V5r4Parser().parse(source, 
      properties);
    TRACE.exiting(this.className, "parse");
    return data;
  }
}
